import request from '@/utils/request'

// 查题
export const select = data => {
  return request({
    method: 'POST',
    url: '/question/getQuestion',
    data
  })
}
// 答案
export const answer = data => {
  return request({
    method: 'POST',
    url: '/question/getScore',
    data
  })
}
// 选年级
export const grade = data => {
  return request({
    method: 'POST',
    url: '/question/questionInfo',
    data
  })
}
// 题类型
export const questionType = data => {
  return request({
    method: 'POST',
    url: '/question/questionType',
    data
  })
}
// 买题
export const buyQuestion = data => {
  return request({
    method: 'POST',
    url: '/question/buyQuestions',
    data
  })
}
// 查题
export const checkQuestion = data => {
  return request({
    method: 'POST',
    url: '/question/getQuestion',
    data
  })
}
// 题答案
export const answerQuestion = data => {
  return request({
    method: 'POST',
    url: '/question/getScore',
    data
  })
}

// 获取所有试卷
export const allExem = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/getAllTestPaper',
    data
  })
}
// 查询用户购买的我的试卷
export const alerdaytest = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/getAllBuyTestPaper',
    data
  })
}

// 指定试卷详情获取
export const exemDetail = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/getTestpaper',
    data
  })
}
// 用户的购买记录
export const userrecord = data => {
  return request({
    method: 'POST',
    url: '/Ordercode/getUserOrderCode',
    data
  })
}

// 买考试题
export const bugexem = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/buyTestPaper',
    data
  })
}

// 查询所有已购买卷子
export const buyExemed = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/getAllBuyTestPaper',
    data
  })
}

// 交卷
export const jiaojuan = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/getTestPaperScore',
    data
  })
}

// 做题记录
export const hisoryed = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/selUserTestPaperScore',
    data
  })
}

// 存记录
export const addexem = data => {
  return request({
    method: 'POST',
    url: '/Testpaper/addTestPaperScore',
    data
  })
}
